home *** CD-ROM | disk | FTP | other *** search
-
- //------------------------------------------------------------------->
- // Not_pc_3.Pov (Not Piece Three).
- //
- // Free demonstration file by: Paul T. Dawson.
- // ptdawson@voicenet.com
- //
- // For the magnificent raytracer, POV-Ray 3.0 (Thank You, POV-Team!).
- //
- // My quasi-clone of "piece3" from the POV-Ray sample files.
- //
- // I used the new loop functions to minimize the code!
-
- //------------------------------------------------------------------->
- // Standard settings and include files.
-
- #version 3.0
- global_settings { assumed_gamma 2.2 }
-
- #include "colors.inc"
- #include "textures.inc"
- #include "golds.inc"
- #include "glass.inc"
- #include "skies.inc"
-
- #default { finish { Shiny } }
-
- //------------------------------------------------------------------->
- // The camera.
-
- camera { location < 0, 75, -45> look_at < 0, 0, -2 > }
-
- //------------------------------------------------------------------->
- // Put in some lights - nothing fancy!
-
- light_source { <-99, 99, -99> color White}
- light_source { < 99, 99, -99> color White}
-
- //------------------------------------------------------------------->
- // Change these variables -carefully- to adjust the "Big_Curly" thing.
- // Original values are 720 (objects) and 10 (loops).
-
- #declare Number_Of_Objects = 720
-
- #declare Little_Loops = 10
-
- // These sizes work exactly like the sizes of a POV-Ray torus.
-
- #declare Minor_Radius = 10
- #declare Major_Radius = 30
-
- //------------------------------------------------------------------->
- // Do NOT touch these. I REPEAT, DO NOT TOUCH THESE!!!
- // All of these values are calculated from the ABOVE settings.
-
- // This is calculated from the two values entered above. For example,
- // if you have 720 objects and 10 loops, then you get 72 per loop!
-
- #declare Objects_Per_Little_Loop = Number_Of_Objects / Little_Loops
-
- // This is calculated from the Number_Of_Objects entered above. Each of
- // the objects is rotated around the y axis, and this setting makes sure
- // that you end up where you started. For example, with 720 objects, each
- // one is 0.5 degrees ahead of the previous one.
-
- #declare Y_Increment = 360 / Number_Of_Objects
-
- // BEFORE the objects spin around the y axis, they have to spin around
- // the z axis. This is how the curly shape is formed. With the example
- // settings of 720 objects and 10 loops, this value equals 5.
-
- #declare Z_Increment = 360 / Objects_Per_Little_Loop
-
- //------------------------------------------------------------------->
- // Create the big curly thing. This one uses spheres, but you can try
- // just about anything (boxes, cones, cylinders, anything else).
-
- #declare Big_Curly = union {
-
- #declare Y_Rotate = 0
- #declare Z_Rotate = 0
-
- #declare A = 1
- #while ( A <= Number_Of_Objects )
-
- sphere { < Minor_Radius, 0, 0 >, 1.5 texture { T_Gold_5E }
-
- // Rotate in a circle around <0,0,0>.
- rotate z * ( -1 * Z_Rotate )
-
- // Now it's somewhere in the xy plane.
- // Move it over to the right.
- translate x * Major_Radius
-
- // Spin it around the y axis.
- rotate y * Y_Rotate
-
- // Just keep increasing these two.
- #declare Y_Rotate = Y_Rotate + Y_Increment
- #declare Z_Rotate = Z_Rotate + Z_Increment
-
- } // End of sphere.
-
- #declare A = A + 1
- #end
-
- } // End of union.
-
- //------------------------------------------------------------------->
- // Now make the connector that goes inside the curly. It's just a torus,
- // with ten spheres attached to it. I used "merge" to put this together,
- // because that eliminates interior surfaces. If you change "merge" to
- // "union", then you can see the torus "inside" the glass spheres.
-
- #declare Connector_Thing = merge {
-
- torus { 30, 1 texture { T_Gold_1A } }
-
- #declare A = 0
- #while ( A <= 9 )
-
- sphere { < 30, 0, 0 >, 6
- rotate y * ( A * 36 )
- texture { T_Ruby_Glass }
- } // End of sphere.
-
- #declare A = A + 1
- #end
-
- } // End of merge.
-
- //------------------------------------------------------------------->
- // Make the big mirror sphere in the middle.
-
- #declare Big_Sphere = sphere { < 0, 0, 0 >, 16
- pigment { White }
- finish { Mirror }
- } // End of sphere.
-
- //------------------------------------------------------------------->
- // Make the floor, with some green and yellow tiles. The tiles go past
- // the edges of the picture a little (on purpose!).
-
- // This is used to switch the tile color.
- #declare FlipFlop = 0
-
- #declare The_Floor = union {
-
- #declare X = -100 #while ( X <= 100 )
- #declare Z = -100 #while ( Z <= 100 )
-
- #declare FlipFlop = 1 - FlipFlop
-
- // This is a "rounded-corner-cube".
-
- superellipsoid { < 0.2, 0.2 >
-
- scale < 4.8, 0.5, 4.8 >
- translate < X, 0, Z >
-
- #if ( FlipFlop = 0 )
- pigment { Yellow } #end
- #if ( FlipFlop = 1 )
- pigment { LimeGreen } #end
-
- normal { crackle 0.3 scale 0.3 }
-
- } // End of superellipsoid.
-
- #declare Z = Z + 10 #end
- #declare X = X + 10 #end
-
- // The "grout around the tiles".
-
- box { < -150, -1, -150 > < 150, 0, 150 >
- pigment { Gray50 }
- normal { bumps 1 scale 0.1 } }
-
- } // End of union.
-
- //------------------------------------------------------------------->
- // Well, it's finally time to go ahead and show everything.
- // The sky sphere is mostly invisible, except in the mirror sphere!
-
- sky_sphere { S_Cloud1 }
-
- object { Big_Curly translate < 0, 10, 0 > }
-
- object { Connector_Thing translate < 0, 10, 0 > }
-
- object { Big_Sphere translate < 0, 10, 0 > }
-
- object { The_Floor translate < 0, -10, 0 > }
-
- //------------------------------------------------------------------->
- // End of this file.
-
-